package com.yonghui.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.yonghui.dto.UserDTO;
import com.yonghui.service.UserService;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @description: TODO
 * @author: zhangtong
 * @create: 2021-03-19 19:36
 **/
@Service(version = "1.0.0",timeout = 3000)
public class UserServiceImpl implements UserService {

    @Override
    public List<UserDTO> getUserList(String name) {
        System.out.println("provider getUserList name = " + name);
        List<UserDTO> list = new ArrayList<>();
        UserDTO userDTO1 = new UserDTO();
        userDTO1.setId(1);
        userDTO1.setName("张三");
        userDTO1.setBirthday(new Date());

        UserDTO userDTO2 = new UserDTO();
        userDTO2.setId(2);
        userDTO2.setName("李四");
        userDTO2.setBirthday(new Date());

        list.add(userDTO1);
        list.add(userDTO2);
        return list;
    }
}
